package com.koushikdutta.ion.bitmap;

import android.graphics.Bitmap;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Point;
import com.koushikdutta.async.util.UntypedHashtable;
import java.io.File;

public class BitmapInfo {
    public final Bitmap[] bitmaps;
    public BitmapRegionDecoder decoder;
    public File decoderFile;
    public int[] delays;
    public long drawTime;
    public Exception exception;
    public final UntypedHashtable extras = new UntypedHashtable();
    public final String key;
    public long loadTime = System.currentTimeMillis();
    public int loadedFrom;
    public final String mimeType;
    public final Point originalSize;

    public BitmapInfo(String key, String mimeType, Bitmap[] bitmaps, Point originalSize) {
        this.originalSize = originalSize;
        this.bitmaps = bitmaps;
        this.key = key;
        this.mimeType = mimeType;
    }

    public int sizeOf() {
        if (this.bitmaps == null) {
            return 0;
        }
        return (this.bitmaps[0].getHeight() * this.bitmaps[0].getRowBytes()) * this.bitmaps.length;
    }
}
